package requestModels

import (
	"errors"
)

type LoginForm struct {
	Account  string `json:"account"`
	Password string `json:"password"`
}

func (receiver *LoginForm) Isvalidated() error {
	if len(receiver.Account) < 5 {
		return errors.New("账号不符合规规范")
	}
	if len(receiver.Password) < 5 {
		return errors.New("密码不符合规范")
	}
	return nil
}
